package com.sofly.service.impl.group3;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sofly.dao.group3.ISuppliersDao;
import com.sofly.entity.Suppliers;
import com.sofly.service.group3.ISuppliersService;
@Service
public class SuppliersServiceImpl implements ISuppliersService {

	@Autowired
	public ISuppliersDao suppliersDao;
	@Override
	public Suppliers getSuppliersBySupplierId(String supplierId) {
		// TODO Auto-generated method stub	 
		return suppliersDao.selectSuppliersBySupplierId(supplierId);
	}
	@Override
	public List<String> getSupplierIdList() {
		// TODO Auto-generated method stub
		return suppliersDao.selectSupplierIdList();
	}
	@Override
	public List<Suppliers> getSuppliersList(int page,int size) {
		// TODO Auto-generated method stub
		return suppliersDao.selectSuppliersList(page,size);
	}
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return suppliersDao.selectCount();
	}
	@Override
	public int addSuppliers(Suppliers suppliers) {
		// TODO Auto-generated method stub
		return suppliersDao.insertSuppliers(suppliers);
	}
	@Override
	public List<Suppliers> getSupplierList() {
		// TODO Auto-generated method stub
		return suppliersDao.selectSupplierList();
	}
	@Override
	public int removeSupplier(String supplierId) {
		// TODO Auto-generated method stub
		return suppliersDao.deleteSupplier(supplierId);
	}
	@Override
	public int editSupplier(Suppliers suppliers) {
		// TODO Auto-generated method stub
		return suppliersDao.updateSupplier(suppliers);
	}

}
